/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化，请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using iMES.Entity.SystemModels;

namespace iMES.Entity.DomainModels
{
    [Entity(TableCnName = "过程检验单", TableName = "Mass_ProcessIns", DetailTable = new Type[] { typeof(Mass_ProcessIns_DetItems) }, DetailTableCnName = "过程检验单-检验项", DBServer = "SysDbContext")]
    public partial class Mass_ProcessIns : SysEntity
    {
        /// <summary>
        ///过程检验单主键
        /// </summary>
        [Key]
        [Display(Name = "过程检验单主键")]
        [Column(TypeName = "int")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public int Mass_ProcessIns_ID { get; set; }

        /// <summary>
        ///检验单名称
        /// </summary>
        [Display(Name = "检验单名称")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        public string Mass_ProcessIns_Name { get; set; }

        /// <summary>
        ///检验单编码
        /// </summary>
        [Display(Name = "检验单编码")]
        [MaxLength(100)]
        [Column(TypeName = "varchar(100)")]
        [Editable(true)]
        public string Mass_ProcessIns_Code { get; set; }

        /// <summary>
        ///检验类型
        /// </summary>
        [Display(Name = "检验类型")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        public string Mass_ProcessIns_Type { get; set; }

        /// <summary>
        ///工单
        /// </summary>
        //[Display(Name = "工单")]
        //[Column(TypeName = "int")]
        //[Editable(true)]
        //public int? Mass_ProcessIns_WorkOrderID { get; set; }

        /// <summary>
        ///工单编号
        /// </summary>
        //[Display(Name = "工单编号")]
        //[MaxLength(100)]
        //[Column(TypeName = "varchar(100)")]
        //[Editable(true)]
        //public string Mass_ProcessIns_WorkOrderCode { get; set; }

        /// <summary>
        ///产品
        /// </summary>
        [Display(Name = "产品")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? Mass_ProcessIns_ProID { get; set; }

        /// <summary>
        ///产品名称
        /// </summary>
        [Display(Name = "产品名称")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        public string Mass_ProcessIns_ProName { get; set; }

        /// <summary>
        ///产品编码
        /// </summary>
        [Display(Name = "产品编码")]
        [MaxLength(100)]
        [Column(TypeName = "varchar(100)")]
        [Editable(true)]
        public string Mass_ProcessIns_ProCode { get; set; }

        /// <summary>
        ///规格型号
        /// </summary>
        [Display(Name = "规格型号")]
        [MaxLength(200)]
        [Column(TypeName = "nvarchar(200)")]
        [Editable(true)]
        public string Mass_ProcessIns_ProModel { get; set; }

        /// <summary>
        ///工序
        /// </summary>
        [Display(Name = "工序")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? Mass_ProcessIns_ProcessID { get; set; }

        /// <summary>
        ///工序编码
        /// </summary>
        [Display(Name = "工序编码")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        public string Mass_ProcessIns_ProcessCode { get; set; }

        /// <summary>
        ///工序名称
        /// </summary>
        [Display(Name = "工序名称")]
        [MaxLength(100)]
        [Column(TypeName = "varchar(100)")]
        [Editable(true)]
        public string Mass_ProcessIns_ProcessName { get; set; }

        /// <summary>
        ///合格品数量
        /// </summary>
        [Display(Name = "合格品数量")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? Mass_ProcessIns_AgreeNum { get; set; }

        /// <summary>
        ///不合格数
        /// </summary>
        [Display(Name = "不合格数")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? Mass_ProcessIns_DisAgreeNum { get; set; }

        /// <summary>
        ///致命缺陷数量
        /// </summary>
        [Display(Name = "致命缺陷数量")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? FatelNum { get; set; }

        /// <summary>
        ///严重缺陷数量
        /// </summary>
        [Display(Name = "严重缺陷数量")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? SevereNum { get; set; }

        /// <summary>
        ///轻微缺陷数量
        /// </summary>
        [Display(Name = "轻微缺陷数量")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? SlightNum { get; set; }

        /// <summary>
        ///检测日期
        /// </summary>
        [Display(Name = "检测日期")]
        [Column(TypeName = "date")]
        [Editable(true)]
        public DateTime? CheckDate { get; set; }

        /// <summary>
        ///检测结果
        /// </summary>
        [Display(Name = "检测结果")]
        [MaxLength(100)]
        [Column(TypeName = "varchar(100)")]
        [Editable(true)]
        public string CheckResult { get; set; }

        /// <summary>
        ///备注
        /// </summary>
        [Display(Name = "备注")]
        [MaxLength(1000)]
        [Column(TypeName = "nvarchar(1000)")]
        [Editable(true)]
        public string Remark { get; set; }

        /// <summary>
        ///创建人编号
        /// </summary>
        [Display(Name = "创建人编号")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? CreateID { get; set; }

        /// <summary>
        ///创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        [MaxLength(30)]
        [Column(TypeName = "nvarchar(30)")]
        [Editable(true)]
        public string Creator { get; set; }

        /// <summary>
        ///修改人编号
        /// </summary>
        [Display(Name = "修改人编号")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? CreateDate { get; set; }

        /// <summary>
        ///修改人编号
        /// </summary>
        [Display(Name = "修改人编号")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? ModifyID { get; set; }

        /// <summary>
        ///修改人
        /// </summary>
        [Display(Name = "修改人")]
        [MaxLength(30)]
        [Column(TypeName = "nvarchar(30)")]
        [Editable(true)]
        public string Modifier { get; set; }

        /// <summary>
        ///修改时间
        /// </summary>
        [Display(Name = "修改时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? ModifyDate { get; set; }

        [Display(Name = "过程检验单-检验项")]
        [ForeignKey("Mass_ProcessIns_ID")]
        public List<Mass_ProcessIns_DetItems> mass_ProcessIns_DetItems { get; set; }
    }
}